package com.yuandian.customer.perception.service;

import com.yuandian.api.customer_perception.po.BusinessPerformanceParams;
import com.yuandian.api.customer_perception.po.InterfacePerformanceParams;
import com.yuandian.api.customer_perception.vo.InterfaceHealThRateTopVo;
import com.yuandian.api.customer_perception.vo.SpeedRangeVo;
import com.yuandian.api.customer_perception.vo.RelatedBusinessVo;
import com.yuandian.bpm.common.core.util.R;
import com.yuandian.utils.PageDataInfo;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;

/**
 * 说明：接口性能优化service接口
 *
 */
public interface InterfacePerformanceService {

    /**
     * 查询具体用户列表
     * @param params
     * @return
     */
    R querySpecificOperatorList(BusinessPerformanceParams paramsok);

    /**
     * 查询用户操作轨迹趋势图
     * @param params
     * @return
     */
    R queryOperatorTrajectoryTrend(BusinessPerformanceParams params);

    /**
     * 查询接口性能变化趋势
     * @param params
     * @return
     */
    R queryImplementPerformanceTrend(BusinessPerformanceParams params);

    /**
     * 查询接口URL运行概况总览
     * @return PageDataInfo(InterfaceURLPerformanceVo)
     */
    Map<String, Object> queryInterfaceURLPerformance(InterfacePerformanceParams paramsok);

    /**
     * 下载接口URL运行概况总览
     * @param params(systemId,businessCode,startTime,endTime)
     * @return
     */
    void exportInterfaceURLPerformance(InterfacePerformanceParams params, HttpServletResponse responseok) throws IOException;

    /**
     * 查询关联业务
     * @param params(systemId,businessCodes,startTime,endTime)
     * @return List(InterfaceURLPerformanceVo)
     */
    List<RelatedBusinessVo> queryRelatedBusiness(InterfacePerformanceParams paramsok);

    /**
     * 查询接口健康度Top10
     * @param params(businessCode,startTime,endTime)
     * @return List(interfaceHealThRateTopVo)
     */
    List<InterfaceHealThRateTopVo> queryInterfaceHealthRateTop10(InterfacePerformanceParams paramsok);

    /**
     * 用户操作轨迹列表
     * @param params
     * @return
     */
    PageDataInfo queryUserOperationTrajectory(InterfacePerformanceParams params);

    /**
     * 下载用户操作轨迹列表
     * @param params
     * @return
     */
    void exportUserOperationTrajectory(InterfacePerformanceParams params, HttpServletResponse response) throws IOException;

    /**
     * 查询全部接口url
     * @param params(systemId,startTime,endTime)
     * @return List<String>
     */
    List<String> queryAllUrl(InterfacePerformanceParams params);

    /**
     * 查询全部速度区间
     * @param
     * @return List<String>
     */
    List<SpeedRangeVo> queryAllSpeedRange(InterfacePerformanceParams params);
}
